package com.tpshion.cloud.common.support;

/**
 * 业务异常对象
 */
public class CoreException extends RuntimeException {

    private String code;

    private String msg;

    public CoreException(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public CoreException(ErrorCode errorCode){
        this.code = errorCode.getCode();
        this.msg = errorCode.getMsg();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
